import socket
import hashlib

secret_key=b'alex_sb'
sk=socket.socket()
sk.connect(('127.0.0.1',9001))

rand=sk.recv(1024)

sha=hashlib.sha1(secret_key)
sha.update(rand)
res=sha.hexdigest()

sk.send(res.encode('utf-8'))

msg = sk.recv(1024)
print(msg)














